<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var a = 10;
        // let a = 10;
        // console.log(a); //报错


        //解构赋值

        //数组的结构赋值
        // let arr = [1,2,3,4,]
        // let [a,b,c,d] = arr
        // console.log(a,b,c,d); 


        //数值交换
        var a =10;
        var b =20;
        var temp = a;
        a = b;
        b = temp;
        // console.log(a,b);
        var [b,a] = [a,b];
        console.log(a,b);
        //数组




        



    </script>
</body>
</html>